<?php

namespace app\common\facade;

use think\Facade;


/**
 * @method static array buildTree(array $nodes, bool $alwaysChildren = true, int $root = 0, string $primaryKey = 'id', string $foreignKey = 'pid', string $childrenKey = 'children') 转换为树形结构
 * @method static string findParentIds(int $pid, string $tableName, string $separator = ',', string $primaryKeyField = 'id', string $parentIdField = 'pid') 获取所有上层ID
 * @method static string findParentNames(int $pid, string $tableName, string $separator = ',', string $primaryKeyField = 'id', string $parentIdField = 'pid', string $nameField = 'name') 获取所有上层名称
 *
 * @see \app\common\helper\TreeHelper
 */
class TreeHelper extends Facade
{
    protected static function getFacadeClass(): string
    {
        return \app\common\helper\TreeHelper::class;
    }
}